package com.jsb.laundry.common.response;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 请求参数封装体
 */
@Data
@ApiModel(description = "公共请求参数")
public class BaseRequestParam {
    /**
     * 当前页  映射JSON "pageNum":"1"
     * 默认 第一页
     */
    @ApiModelProperty(value = "当前页(默认 1)")
    public int pageNum = 1;

    /**
     * 当前页大小
     * 默认 10
     */

    @ApiModelProperty("页大小(默认 10)")
    public int pageSize = 10;

    /**
     * 配置其他请求参数
     */
    @JsonAlias(value = {"keywords", "goodsId", "userId", "shopsId", "orderId", "categoryId"})
    private String param;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date currentTime;

}
